package JsonCfg

import (
	"encoding/json"
	"fmt"
	"io/ioutil"
)

func LoadCfg(cfg interface{},filename string) bool {

	data,err:=ioutil.ReadFile(filename)
	if err != nil {
		fmt.Println(err)
		return false
	}
	err = json.Unmarshal(data,cfg)
	if err != nil {
		fmt.Println(err)
		return false
	}
	return true
}